package com.kcwl.carrier.domain.factory;


import com.kcwl.carrier.domain.entity.CarrierCooperateInfo;
import com.kcwl.carrier.interfaces.command.CarrierApproveCommand;
import com.kcwl.ddd.application.constants.YesNoEnum;

/**
 * @author 刘旭超
 * @date 2022年07月13日 16:38
 * @Description
 */
public class CarrierCooperateInfoFactory {

    /**
     * 创建运力辅助人认证信息对象
     */
    public static CarrierCooperateInfo createCarrierCooperateApproveInfo(CarrierApproveCommand carrierApproveCommand) {
        CarrierCooperateInfo carrierCooperateInfo = new CarrierCooperateInfo();
        carrierCooperateInfo.setCarrierId(carrierApproveCommand.getUserId());
        carrierCooperateInfo.setEnterpriseName(carrierApproveCommand.getCooperateEnterpriseName());
        carrierCooperateInfo.setCooperateType(carrierApproveCommand.getCooperateType());
        carrierCooperateInfo.setUnifiedSocialCreditCode(carrierApproveCommand.getCooperateUnifiedSocialCreditCode());
        carrierCooperateInfo.setCooperateProvePic(carrierApproveCommand.getCooperateProvePic());
        carrierCooperateInfo.setDeleted(YesNoEnum.NAY.getValue());
        return carrierCooperateInfo;
    }
}
